package com.qq.client.model;

import java.io.IOException;
import java.io.ObjectOutputStream;
import java.io.Serializable;
import java.net.Socket;

import com.qq.common.Message;

public class MessageSend implements Serializable{

	ObjectOutputStream oos = null;

	public MessageSend(String header, String sender, String receiver, String content,
			String time) {
		Message msg = new Message();
		msg.setHeader(header);
		msg.setSender(sender);
		msg.setReceiver(receiver);
		msg.setContent(content);
		msg.setTime(time);

		try {
			oos = new ObjectOutputStream(manageSocket.getMessageReceiver(sender).getS().getOutputStream());
			oos.writeObject(msg);
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
}
